package top.dark.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import top.dark.common.utils.PageUtils;
import top.dark.product.entity.CategoryEntity;
import top.dark.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author lijiao
 * @email DarknessShadow11@outlook.com
 * @date 2021-02-01 10:42:11
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 三级分类查询
     */
    List<CategoryEntity> listTree();

    void removeBatchByIds(List<Long> asList);

    Long[] getCatelogPath(Long catelogId);

    void updateDetail(CategoryEntity category);

    Map<Long, List<Catelog2Vo>>  getCatelogJsonFromDbWithRedisLock();

    List<CategoryEntity> getLevel1Categorys();

    Map<Long, List<Catelog2Vo>> getCatelogsFromDb();
}

